package com.icangya.domain;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "commission_record")
public class CommissionRecord {//佣金记录表
    private Long id;
    private String openId;//用户id
    private String commissionType;//获取佣金金额类型（文本表示）
    private double commissionMoney;//佣金金额
    private Timestamp commissionTime;//获取佣金时间
    private int commissionTypec;//获取佣金金额类型（数字表示）0：直推一级商城奖励，1：直推二级商城奖励，2：营业额百分比均分回馈
    private long userid;//用户的id
    private String remark;//佣金说明



    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "openid")
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Basic
    @Column(name = "commission_type")
    public String getCommissionType() {
        return commissionType;
    }

    public void setCommissionType(String commissionType) {
        this.commissionType = commissionType;
    }

    @Basic
    @Column(name = "commission_money")
    public double getCommissionMoney() {
        return commissionMoney;
    }

    public void setCommissionMoney(double commissionMoney) {
        this.commissionMoney = commissionMoney;
    }

    @Basic
    @Column(name = "commission_time")
    public Timestamp getCommissionTime() {
        return commissionTime;
    }

    public void setCommissionTime(Timestamp commissionTime) {
        this.commissionTime = commissionTime;
    }

    @Basic
    @Column(name = "commissionTypec")
    public int getCommissionTypec() {
        return commissionTypec;
    }

    public void setCommissionTypec(int commissionTypec) {
        this.commissionTypec = commissionTypec;
    }
    @Basic
    @Column(name = "userid")
    public long getUserid() {
        return userid;
    }

    public void setUserid(long userid) {
        this.userid = userid;
    }
    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public CommissionRecord(String openId, String commissionType, double commissionMoney, Timestamp commissionTime) {
        this.openId = openId;
        this.commissionType = commissionType;
        this.commissionMoney = commissionMoney;
        this.commissionTime = commissionTime;
    }

    public CommissionRecord(String openId, String commissionType, double commissionMoney, Timestamp commissionTime, int commissionTypec, long userid, String remark) {
        this.openId = openId;
        this.commissionType = commissionType;
        this.commissionMoney = commissionMoney;
        this.commissionTime = commissionTime;
        this.commissionTypec = commissionTypec;
        this.userid = userid;
        this.remark = remark;
    }

    public CommissionRecord() {
    }

    @Override
    public String toString() {
        return "CommissionRecord{" +
                "id=" + id +
                ", openId='" + openId + '\'' +
                ", commissionType='" + commissionType + '\'' +
                ", commissionMoney=" + commissionMoney +
                ", commissionTime=" + commissionTime +
                ", commissionTypec=" + commissionTypec +
                ", userid=" + userid +
                ", remark='" + remark + '\'' +
                '}';
    }
}
